package com.example.financialsystem;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
import com.bigkoo.pickerview.listener.OnOptionsSelectChangeListener;
import com.bigkoo.pickerview.listener.OnOptionsSelectListener;
import com.bigkoo.pickerview.view.OptionsPickerView;

import com.example.financialsystem.adapter.RecordViewPagerAdapter;
import com.example.financialsystem.datas.AccountBean;
import com.example.financialsystem.datas.OClassificationBean;
import com.example.financialsystem.fragment.IncomeRecordFragment;
import com.example.financialsystem.fragment.OutcomeRecordFragment;

import java.util.ArrayList;
import java.util.List;

import models.Book;
import models.User;
import models.UserVO;

import static others.Const.CURRENT_BOOK;
import static others.Const.CURRENT_USER;

public class AddRecordActivity extends AppCompatActivity implements View.OnClickListener {

    private ViewPager viewPager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_record);

        Intent intent = getIntent();

        viewPager = (ViewPager)findViewById(R.id.Add_Record_ViewPager);
        OutcomeRecordFragment fragment1 = new OutcomeRecordFragment();
        IncomeRecordFragment fragment2 = new IncomeRecordFragment();
        List<Fragment> fragments = new ArrayList<>();
        fragments.add(fragment1);
        fragments.add(fragment2);

        RecordViewPagerAdapter adapter = new RecordViewPagerAdapter(getSupportFragmentManager(),fragments);
        viewPager.setAdapter(adapter);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
        }
    }

}
